package io.gitee.mojingjiao.day03;

public class DemoBooks {
    public static void main(String[] args) {
        Book b1=new Book(01,"三字经",20);
        Book b2=new Book(02,"西游记",30);
        Book b3=new Book(03,"红楼梦",40);
       mostExpensive(b1,b2,b3);
    }
    public static void mostExpensive(Book b1,Book b2,Book b3){
        int min=b1.getPrice()>b2.getPrice()?b1.getPrice():b2.getPrice();
        int  max=min>b3.getPrice()?min:b3.getPrice();

    }
}
class Book{
    private int number;
    private  String name;
    private  int price;

    public Book(int number, String name, int price) {
        this.number = number;
        this.name = name;
        this.price = price;
    }

    public int getNumber() {
        return number;
    }

    public String getName() {
        return name;
    }

    public int getPrice() {
        return price;
    }


}